﻿#region Using Directives

using System;
using System.Globalization;

#endregion Using Directives


namespace Kongo.Filters
{
    internal static class FormatFilter
    {
        #region Methods

        public static object Handler(object value, string arg)
        {
            if (value == null)
                return null;

            if (!String.IsNullOrEmpty(arg))
                return String.Format(CultureInfo.InvariantCulture, arg, value);

            return value.ToString();
        }

        #endregion Methods
    }
}
